package sunbao.ido.util;

import org.redisson.api.RTransaction;
import org.redisson.api.RedissonClient;
import org.redisson.api.TransactionOptions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Classname RedisUtil
 * @Description
 * @Date 2020/05/15 15:58
 * @Created by Administrator
 */
@Component
public class RedisUtil {

    @Autowired
    private RedissonClient redissonClient;

    private void t(){
        RTransaction transaction = redissonClient.createTransaction(TransactionOptions.defaults());
        try {
            transaction.commit();
        }catch (Exception e){

        }finally {
            transaction.rollback();
        }
    }
}

